package com.itzx.utils;

import java.io.InputStream;
import java.util.Properties;

/**
 * 读取配置文件的工具类
 * @Author yyeleven
 */
public class CanalUtil {

    //构造器私有,不允许new
    private CanalUtil() {}

    // 读取配置文件(加载canal的配置文件)
    public static Properties loadProperties(String path) throws Exception {
        Properties properties = new Properties();
        InputStream inputStream = CanalUtil.class.getResourceAsStream(path);
        properties.load(inputStream);
        return properties;
    }
}
